import { createStore } from 'vuex'

export default createStore({
  state: {//定义共享数据
    token:"",
    uname:""
  },
  mutations: {//定义函数，修饰数据
    setToken(state,tk){
      state.token=tk;
    },
    setUname(state,name){
      state.uname=name;
    }
  },
  actions: {
  },
  modules: {
  }
})
